package F02;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

public class Test2FileOutputStream {
    public static void main(String[] args) throws IOException {

        FileOutputStream fos=new FileOutputStream("1.txt");
        File file=new File("1.txt");
        FileOutputStream fos2=new FileOutputStream(new File("1.txt"));
//        fos.write(97);
//        fos.write(98);
//        fos.write(99);
//        fos.write(100);
//        fos.write(101);


        byte []bys={97,98,99,100,101,102};
      //  fos.write(bys);
        byte []bys2="bacdefg".getBytes(StandardCharsets.UTF_8);
        fos.write(bys2);
        fos.write(bys,0,bys.length);
    }
}
